<!--  -->
<template>
  <div class="goods-box">
    <img :src="data.list_pic_url" alt="">
    <div>
      <div class="goods-name">{{data.name}}</div>
      <div class="goods-price">￥{{data.retail_price}}元</div>
    </div>
    
  </div>
</template>

<script>
import {defineComponent} from 'vue'
export default defineComponent({
  name: 'GoodsBox',
  props: {
    data: {
      type: Object,
      default() {
        return {}
      }
    }
  }
})
</script>

<style lang="scss" scoped>
  .goods-box {
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: space-around;
  }
  img {
    width: 100%;
    height: 73%;
  }
  .goods-name, .goods-price {
    width: 360px;
    font-size: 28px;
   text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .goods-price {
    color: #8b0000;
    text-align: center;
    margin-top: 20px;
  }
</style>